/**
 * 跳一跳方形方块，继承base-block类
 */
import BaseBlock from './base'

class Cuboid extends BaseBlock {
    constructor(x, y, z) {
        super('cuboid')
        
        this.x = x
        this.y = y
        this.z = z

        const geometry = new THREE.BoxGeometry(this.width, this.height, this.width)
        const material = new THREE.MeshBasicMaterial({
            color: 0x4f6666
        })
        this.instance = new THREE.Mesh(geometry, material)
        this.instance.position.x = this.x
        this.instance.position.y = this.y
        this.instance.position.z = this.z
        this.instance.name = 'block'

    }
}

export default Cuboid